﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="TradesDataSet" targetNamespace="http://tempuri.org/TradesDataSet.xsd" xmlns:mstns="http://tempuri.org/TradesDataSet.xsd" xmlns="http://tempuri.org/TradesDataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="TradesConnectionString1" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="TradesConnectionString1 (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.Trade_Recorder.Properties.Settings.GlobalReference.Default.TradesConnectionString1" Provider="Microsoft.SqlServerCe.Client.3.5" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="TradesTableAdapter" GeneratorDataComponentClassName="TradesTableAdapter" Name="Trades" UserDataComponentName="TradesTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="TradesConnectionString1 (Settings)" DbObjectName="Trades" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [Trades] WHERE (([ID] = @p1))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@p1" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ID" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [Trades] ([Instrument], [Position], [Strategy], [EntryPrice], [TP1], [TP2], [FinalExitPrice], [Pips], [Datestamp]) VALUES (@p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p1" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Instrument" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p2" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Position" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p3" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Strategy" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p4" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="EntryPrice" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p5" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TP1" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p6" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TP2" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p7" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="FinalExitPrice" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p8" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Pips" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p9" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Datestamp" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT [ID], [Instrument], [Position], [Strategy], [EntryPrice], [TP1], [TP2], [FinalExitPrice], [Pips], [Datestamp] FROM [Trades]</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [Trades] SET [Instrument] = @p1, [Position] = @p2, [Strategy] = @p3, [EntryPrice] = @p4, [TP1] = @p5, [TP2] = @p6, [FinalExitPrice] = @p7, [Pips] = @p8, [Datestamp] = @p9 WHERE (([ID] = @p10))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p1" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Instrument" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p2" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Position" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p3" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Strategy" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p4" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="EntryPrice" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p5" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TP1" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p6" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TP2" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p7" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="FinalExitPrice" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p8" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Pips" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@p9" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Datestamp" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@p10" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ID" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="ID" DataSetColumn="ID" />
              <Mapping SourceColumn="Instrument" DataSetColumn="Instrument" />
              <Mapping SourceColumn="Position" DataSetColumn="Position" />
              <Mapping SourceColumn="Strategy" DataSetColumn="Strategy" />
              <Mapping SourceColumn="EntryPrice" DataSetColumn="EntryPrice" />
              <Mapping SourceColumn="TP1" DataSetColumn="TP1" />
              <Mapping SourceColumn="TP2" DataSetColumn="TP2" />
              <Mapping SourceColumn="FinalExitPrice" DataSetColumn="FinalExitPrice" />
              <Mapping SourceColumn="Pips" DataSetColumn="Pips" />
              <Mapping SourceColumn="Datestamp" DataSetColumn="Datestamp" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="TradesDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="TradesDataSet" msprop:Generator_DataSetName="TradesDataSet" msprop:EnableTableAdapterManager="True">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Trades" msprop:Generator_UserTableName="Trades" msprop:Generator_RowDeletedName="TradesRowDeleted" msprop:Generator_RowChangedName="TradesRowChanged" msprop:Generator_RowClassName="TradesRow" msprop:Generator_RowChangingName="TradesRowChanging" msprop:Generator_RowEvArgName="TradesRowChangeEvent" msprop:Generator_RowEvHandlerName="TradesRowChangeEventHandler" msprop:Generator_TableClassName="TradesDataTable" msprop:Generator_TableVarName="tableTrades" msprop:Generator_RowDeletingName="TradesRowDeleting" msprop:Generator_TablePropName="Trades">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="1" msprop:Generator_UserColumnName="ID" msprop:Generator_ColumnPropNameInRow="ID" msprop:Generator_ColumnVarNameInTable="columnID" msprop:Generator_ColumnPropNameInTable="IDColumn" type="xs:int" />
              <xs:element name="Instrument" msprop:Generator_UserColumnName="Instrument" msprop:Generator_ColumnPropNameInRow="Instrument" msprop:Generator_ColumnVarNameInTable="columnInstrument" msprop:Generator_ColumnPropNameInTable="InstrumentColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Position" msprop:Generator_UserColumnName="Position" msprop:Generator_ColumnPropNameInRow="Position" msprop:Generator_ColumnVarNameInTable="columnPosition" msprop:Generator_ColumnPropNameInTable="PositionColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Strategy" msprop:Generator_UserColumnName="Strategy" msprop:Generator_ColumnPropNameInRow="Strategy" msprop:Generator_ColumnVarNameInTable="columnStrategy" msprop:Generator_ColumnPropNameInTable="StrategyColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="EntryPrice" msprop:Generator_UserColumnName="EntryPrice" msprop:Generator_ColumnPropNameInRow="EntryPrice" msprop:Generator_ColumnVarNameInTable="columnEntryPrice" msprop:Generator_ColumnPropNameInTable="EntryPriceColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="TP1" msprop:Generator_UserColumnName="TP1" msprop:Generator_ColumnPropNameInRow="TP1" msprop:Generator_ColumnVarNameInTable="columnTP1" msprop:Generator_ColumnPropNameInTable="TP1Column" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="TP2" msprop:Generator_UserColumnName="TP2" msprop:Generator_ColumnPropNameInRow="TP2" msprop:Generator_ColumnVarNameInTable="columnTP2" msprop:Generator_ColumnPropNameInTable="TP2Column" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="FinalExitPrice" msprop:Generator_UserColumnName="FinalExitPrice" msprop:Generator_ColumnPropNameInRow="FinalExitPrice" msprop:Generator_ColumnVarNameInTable="columnFinalExitPrice" msprop:Generator_ColumnPropNameInTable="FinalExitPriceColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Pips" msprop:Generator_UserColumnName="Pips" msprop:Generator_ColumnPropNameInRow="Pips" msprop:Generator_ColumnVarNameInTable="columnPips" msprop:Generator_ColumnPropNameInTable="PipsColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Datestamp" msprop:Generator_UserColumnName="Datestamp" msprop:Generator_ColumnPropNameInRow="Datestamp" msprop:Generator_ColumnVarNameInTable="columnDatestamp" msprop:Generator_ColumnPropNameInTable="DatestampColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint2" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Trades" />
      <xs:field xpath="mstns:Pips" />
    </xs:unique>
  </xs:element>
</xs:schema>